/*
 * Flight.h
 *
 *  Created on: May 6, 2014
 *      Author: alexander
 */

#ifndef FLIGHT_H_
#define FLIGHT_H_

#include <string>

class Flight
{
public:
	Flight()
	{
		currency_ = "";
		price_ = -1;
	}

	Flight(double price, const std::string& currency);

	const std::string& getCurrency() const {
		return currency_;
	}

	void setCurrency(const std::string& currency) {
		currency_ = currency;
	}

	double getPrice() const {
		return price_;
	}

	void setPrice(double price) {
		price_ = price;
	}

	bool isValid() const
	{
		return (price_ > 0);
	}

	static Flight obtainFlightFromWeb(const std::string& where, const std::string& when);

private:

	double price_;
	std::string currency_;
};



#endif /* FLIGHT_H_ */
